# type 是python的元类
class Invoke(type):
    def __new__(cls, clazz_name, extend_clazz, fields):
        dict_tmp = {}
        for key, val in fields.items():
            if not key.startswith('__'):
                dict_tmp[key.upper()] = val
            else:
                dict_tmp[key] = val

        return super().__new__(cls, clazz_name, extend_clazz, dict_tmp)


Test = Invoke('Test', (object,), {'name': 'tes', 'age': 23, '__like': [1, 2, 3]})
t = Test()
print(t.NAME)
print(t.AGE)
print(t.__like)

